import org.junit.Test;

import com.zj.common.entity.User;
import com.zj.common.service.UserService;
import com.zj.common.util.SpringUtil;

import redis.clients.jedis.Jedis;

public class UserTest {
	@Test  
	public void test1(){  
	   //测试  
		UserService studentAction=(UserService) SpringUtil.getBeanById("userService");
	    
	 User user = new User(2,"测试");  
	 studentAction.save(user);  
	     
	}  
	//测试redis
	@Test
	public  void test2() {
		Jedis jedis = new Jedis("localhost");
        System.out.println("连接成功");
        //查看服务是否运行
        System.out.println("服务正在运行: "+jedis.ping());
        System.out.println("jy is"+jedis.get("jy")); 
        jedis.close();
	}
	 
	
}
